package com.wu.mvp.model.base;

import com.wu.mvp.R;
import com.wu.mvp.utils.LogUtil;
import com.wu.mvp.utils.ToastUtil;

import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;

public class ObserverHandler<T> implements Observer<T> {
    @Override
    public void onSubscribe(Disposable d) {

    }

    @Override
    public void onNext(T t) {

    }

    @Override
    public void onError(Throwable e) {
        LogUtil.e(e.getMessage());
        ToastUtil.error(R.string.err_request);
    }

    @Override
    public void onComplete() {

    }
}
